package com.cy.basic;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * DATE: 10:27
 * @Author: LuckyH
 */
public class HelloWorld extends Object{

    final static Map<String,Integer> map2 = new HashMap<>();
    // 这里需要new一个实例
    private static Map<String,Integer> map = new HashMap<>();

     static {
         map.put("luck", 10);
         map=Collections.unmodifiableMap(map);
    }

    public static void main(String[] args) {
        System.out.println("HelloWorld");

//        可以使用 edit configuration 给main传参
        // 多个内容用空格隔开
        for (int i = 0; i < args.length; i++) {
            System.out.println(args[i]);
        }

        System.out.println(map);
        //map.put("jack", 20);
        System.out.println();
        System.out.println();

        System.out.println("hello\t"+(args.length>0?args[1]:"world"));

        map2.put("jack", 10);
        System.out.println(map2);
    }

    public static void init(){

    }
}
